{% extends "../base.html" %}

{% block title %}{{ pigeon.subject|escape }}{% endblock %}

{% block css %}
<link type="text/css" rel="stylesheet" href="/css/inbox/detail.css" />
{% endblock %}

{% block content %}
<div id="subject">{{ pigeon.subject|escape }}</div>
<div id="message">
    <div id="post_at" title="{{ pigeon.post_at|tz|date:"Y/m/d(D) H:i" }}">{{ pigeon.post_at|timesince }}前</div>
    <div id="from" title="{{ pigeon.from_user.email|escape }}">{{ pigeon.from_user.nickname|escape }}</div>
    <div id="importance" class="importance-{{ pigeon.importance|escape }}">{{ pigeon.importance|importance }}</div>
    <div id="body">{{ pigeon.body|escape|linebreaksbr }}</div>
    <ul id="to">
    {% for to in pigeon.pigeontos %}
        <li title="{{ to.to_user.email|escape }} {{to.read_at|tz|date:"Y/m/d(D) H:i"}}">
            <span class="to_nickname">{{ to.to_user.nickname|escape }}</span>
            {% if to.read_at %}
            <span class="read_at">({{to.read_at|timesince}}前)</span>
            {% else %}
            <span class="unread">(未読)</span>
            {% endif %}
        </li>
    {% endfor %}
    </ul>
    <div id="control">
        <span id="reply"><a href="/new/reply?create_from={{ pigeon.key.id }}">返信</a></span>
        <span id="forward"><a href="/new/forward?create_from={{ pigeon.key.id }}">転送</a></span>
    </div>
</div>
{% endblock %}
